package com.wn.member.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2023 -07-17
 * @desc
 */
@Slf4j
@RestController
@RequestMapping("member")
public class MemberController {

    @Value("${server.port}")
    private Integer port;

    @GetMapping("/{id}")
    public String findMemberById(@PathVariable("id") Integer id){

//        try {
//            Thread.sleep(3000L);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }

        log.info("我的服务的端口是:{}",port);
        return "会员是:" + id;
    }

}
